package com.yunzhou.utils;

/**
 * ThreadLocal 工具类
 */
public class ThreadLocalUtil {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentUserId(Long userId) {
        threadLocal.set(userId);
    }

    public static Long getCurrentUserId() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }
}
